{{- $alt := .Get "alt" | default "image" }}
{{- $fit := .Get "fit" | default "contain" }}
{{- $height := .Get "height" }}
{{- $href := .Get "href" }}
{{- $src := .Get "src" }}
{{- $target := .Get "target" | default "_blank" }}
{{- $width := .Get "width" }}

{{- if $href }}<a class="deco-none" href="{{$href}}" target="{{$target}}">{{ end -}}
<img class="inline-img in-text" {{- with $height }}height="{{ . }}"{{ end }} {{- with $width }}width="{{ . }}"{{ end }} src="{{- if (hasPrefix $src "/") }}
{{- urls.JoinPath site.Params.contentBaseURL $src -}}
{{ else }}
{{- $src -}}
{{ end -}}" alt="{{$alt}}" style="object-fit:{{$fit}}">
{{- if $href }}</a>{{ end }}